<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>卖家菜单</title>
  <link rel="stylesheet" href="/css/SellerMenuList2.css">
</head>
<body>
<div>
  <ul id="s">
    <li><a href="/seller/menulist1"> 菜单1 </a></li>
    <li><a href="/seller/menulist2"> >菜单2 </a></li>
    <li><a href=""> 编辑 </a></li>
    <li><a href="/seller/order2"> 订单 </a></li>
    <li><a href="/table/seller"> 餐桌 </a></li>
    <div id="a">
      欢迎<span th:text="${username}"></span>登入
    </div>
  </ul>
</div>


<div id="bossmenu1">
  <table id="bossmenu">
    <tr>
      <th colspan="6"><a id="c" href=# title="基于Thymeleaf">菜单</a></th>
    </tr>
    <tr>
      <th id="first">图片</th><th>菜品id</th><th>菜品名字</th><th>价格</th><th>状态</th><th>操作</th>
    </tr>
    <tr th:each="foodmenu : ${menuHtml}"> <!--Thymeleaf-->
      <td><img th:src="@{${dishurl}+${foodmenu.id}+'.jpg'}" onerror="this.src='../images/Mysterious.jpg';this.onerror=null;"></td>
      <td th:text="${foodmenu.id}"></td>
      <td th:text="${foodmenu.foodname}"></td>
      <td th:text="${foodmenu.foodprice}"></td>
      <td th:text="${foodmenu.foodstatus} == 1 ? '在售':'停售'"></td>
      <td><a th:href="@{'/menu/edit/'+${foodmenu.id}}" href="javascript.void();"><button id="b">编辑</button></a></td>
    </tr>
  </table>
</div>
  <a href="/menu/new"><button id="f">添加新菜品</button></a>
</body>
</html>